﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="UserConfig.aspx.cs" Inherits="doris.Admin.UserConfig" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="UserID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="UserID" HeaderText="UserID" ReadOnly="True" 
                SortExpression="UserID" Visible="False" />
            <asp:BoundField DataField="Username" HeaderText="Username" 
                SortExpression="Username" />
            <asp:BoundField DataField="Fullname" HeaderText="Fullname" 
                SortExpression="Fullname" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Rolename" HeaderText="Rolename" 
                SortExpression="Rolename" />
            <asp:TemplateField HeaderText="IsOnLine" SortExpression="IsOnLine">
                <EditItemTemplate>
                    <asp:TextBox ID="CheckBox2" runat="server" Text='<%# Bind("IsOnLine") %>' />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="CheckBox2" runat="server" Text='<%# Bind("IsOnLine") %>' 
                        Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="IsApproved" SortExpression="IsApproved">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("IsApproved") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("IsApproved") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" 
                SortExpression="CreationDate" />
            <asp:BoundField DataField="LastActivityDate" HeaderText="LastActivityDate" 
                SortExpression="LastActivityDate" />
            <asp:TemplateField HeaderText="IsLockedOut" SortExpression="IsLockedOut">
                <EditItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" 
                        Checked='<%# Bind("IsLockedOut") %>' />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" 
                        Checked='<%# Bind("IsLockedOut") %>' Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:localConnectionString %>" 
        DeleteCommand="deleteAgent" DeleteCommandType="StoredProcedure" 
        ProviderName="<%$ ConnectionStrings:localConnectionString.ProviderName %>" 
        SelectCommand="getAgents" SelectCommandType="StoredProcedure">
        <DeleteParameters>
            <asp:Parameter Name="in_userid" Type="String" />
        </DeleteParameters>
    </asp:SqlDataSource>
    <asp:HyperLink ID="HyperLink1" runat="server" 
        NavigateUrl="~/Admin/MailConfig.aspx">Tilbake</asp:HyperLink>

</asp:Content>
